
//#include <CSharpGarbagePointer.h>
#include <System/Object.h>
#include <System/String.h>
#include <System/Type.h>
#include <System/Activator.h>

// DEBUG.
#include "Debug.h"

using namespace Riccsson::System;

REGISTER_CLASS_CPP( Object )
{

}

//---------------------------------------------------------------------------------------
Object::Object()
{
}


//---------------------------------------------------------------------------------------
Object::~Object()
{
}


//---------------------------------------------------------------------------------------
bool Object::Equals(const Object* obj)
{
	return false;
}

//---------------------------------------------------------------------------------------
bool Object::Equals(const Object* objA, const Object* objB)
{
	return false;
}

//---------------------------------------------------------------------------------------
int Object::GetHashCode()
{
	// Take the address of this pointer as HashCode.
	return reinterpret_cast<int>(this);
}

//---------------------------------------------------------------------------------------
GC_PTR<Type> Object::GetType() const
{
	return GC_PTR<Type>(new Type( __getClassName() ));
}

//---------------------------------------------------------------------------------------
bool Object::ReferenceEquals(const Object* objA, const Object* objB)
{
	return (&objA == &objB);
}

//---------------------------------------------------------------------------------------
GC_PTR<String> Object::ToString()
{
	return GC_PTR<String>( new String( String("") + (int)this + " at " + this->__getClassName() ) );
}

//---------------------------------------------------------------------------------------
GC_PTR<String> Object::ToString() const
{
	return const_cast<Object*>(this)->ToString();
}

//---------------------------------------------------------------------------------------
GC_PTR<Object> Object::MemberwiseClone()
{
	throw;
}

//bool operator ==(const Object& a, const Object& b)
//{
//	return &a == &b;
//}